#!/bin/sh

INSTPATH="/Applications/GlobeTrotter Connect"
BINLOCATION="GlobeTrotter Connect.app/Contents/MacOS"

# 1
killall -HUP kextd
sleep 4

# 2
if [ -u "${INSTPATH}/${BINLOCATION}/NetworkConfiguration" ]
then
	"${INSTPATH}/${BINLOCATION}/NetworkConfiguration" setup emb.ne.jp em em
else
	exit -1
fi

# 3
if [ -u "${INSTPATH}/${BINLOCATION}/CardSwitcher" ]
then
	"${INSTPATH}/${BINLOCATION}/CardSwitcher" $PPID
else
	exit -1
fi

exit 0
